package com.terrier.ui.skins.skinBaseClasses
{
    import com.terrier.ui.skins.IWxPanelSkin;
    import com.terrier.ui.skins.WxFlaSkinUtility;

    import flash.display.DisplayObject;
    import flash.display.Sprite;

    public class WxPanelSkinBase implements IWxPanelSkin
    {
        protected var _bgSkin:DisplayObject;

        public function WxPanelSkinBase()
        {

        }

        public function get bgSkin():DisplayObject
        {
            return _bgSkin;
        }

        public function get customLayout():Boolean
        {
            return false;
        }

        public function get width():Number
        {
            return _bgSkin.width;
        }

        public function set width(value:Number):void
        {
            _bgSkin.width = value;
        }

        public function get height():Number
        {
            return _bgSkin.height;
        }

        public function set height(value:Number):void
        {
            _bgSkin.height = value;
        }

        public function initByAsset(asset:Sprite):void
        {
            _bgSkin = WxFlaSkinUtility.getDisplayObject(asset, 1);
        }
    }
}
